{% extends "themes/default/base.html" %}
{% load i18n %}
{% load comment %}

{% block header %}
<link rel="stylesheet" type="text/css" href="/senbzblog/templates/themes/{{ blog.theme }}/static/css/comment.css" media="screen"/>
<link rel="stylesheet" type="text/css" href="/senbzblog/static/prettify.css"/>
<style type="text/css">
	.blogstyle .col4 { display: block; }
	.blogstyle2 .col4 { display: block; }
</style>
<script type="text/javascript" src="/senbzblog/static/js/prettify.js"></script>
<script type="text/javascript">
<!--
	$(document).ready(function(){
		prettyPrint();
	});
//-->
</script>
{% endblock %}

{% block col1 %}
	<h1>{{ page.title }}</h1>
	<p>
	{{ page.contents|safe }}
	</p>
{% endblock %}

{% block col4 %}
<h2 id="article-comments">{%trans "Comments"%}</h2>
<div id="div_comments">
	{% get_comment_form for page as commentform %}
	{% render_comment_list for page %}
	
	<a name="comment-form"></a>
	<form action="{{ page.get_post_comment_url }}" class="form1" method="post" 
		onsubmit="return senbz.validator.check_comment('user_name','user_email', 'comment')">
		{% if nexturl %}
	  	<div><input type="hidden" name="nexturl" value="{{ nexturl }}#article-comments" /></div>
	  	{% endif %}
	  	<div>
		  	{{ commentform.content_type }}
		  	{{ commentform.object_pk }}
		  	{{ commentform.parent_id }}
		  	{{ commentform.pertain }}
		  	{{ commentform.user_id }}
	  	</div>
	  	<div class="textarea_wrapper" style="width: 270px">
	  		{{ commentform.user_name }}
	  		<label for="user_name">{% trans "Name" %}<span class="red">*</span> </label>
	  		{% if commentform.user_name.errors %}
	  		{{ commentform.user_name.errors }}
	  		{% endif %}
	  	</div>
	  	<div class="textarea_wrapper" style="width: 270px">
	  		{{ commentform.user_email }}
	  		<label for="user_email">{% trans "Email address" %}<span class="red">*</span> </label>
	  		{% if commentform.user_email.errors %}
	  		{{ commentform.user_email.errors }}
	  		{% endif %}
	  	</div>
	  	<div class="textarea_wrapper" style="width: 270px">
	  		{{ commentform.user_url }}
	  		<label for="user_url">{% trans "URL" %} </label>
	  		{% if commentform.user_url.errors %}
	  		{{ commentform.user_url.errors }}
	  		{% endif %}
	  	</div>
	  	<div class="textarea_wrapper">{{ commentform.comment }}</div>
		<div>{{ commentform.is_mailnotify }}
			<label for="is_mailnotify">{% trans "is mailnotify" %} </label></div>
	  	<p class="submit">
			<input type="submit" name="post" class="submit-post" value="{% trans 'Reply' %}" />
	  	</p>
	</form>
</div>
{% endblock %}